package STUDENT.NGUYENHUUTHANG.MVC.B4;

public class Models {
	public int CheckDay(DateObject objObject) {
		if (objObject.getMonth() == 4 || objObject.getMonth() == 6 || objObject.getMonth() == 9
				|| objObject.getMonth() == 11) {
			return 30;
		} else if (objObject.getMonth() == 2) {
			if ((objObject.getYear() % 400 == 0) 
					|| (objObject.getYear() % 4 == 0 
					&& objObject.getYear() % 100 != 0))  {
				return 29;
			} else
				return 28;

		} else
			return 31;

	}
}
